package com.dimples.system.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.util.Date;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * @author zhongyj <1126834403@qq.com><br/>
 * @date 2021/7/18
 */
@ApiModel(value = "com-dimples-system-entity-Dept")
@Data
@TableName(value = "t_dept")
public class SysDept {
    /**
     * 部门ID
     */
    @TableId(value = "DEPT_ID", type = IdType.AUTO)
    @ApiModelProperty(value = "部门ID", hidden = true)
    private Long deptId;

    /**
     * 上级部门ID
     */
    @TableField(value = "PARENT_ID")
    @ApiModelProperty(value = "上级部门ID")
    @NotNull(message = "不能为空")
    private Long parentId;

    /**
     * 部门名称
     */
    @TableField(value = "DEPT_NAME")
    @ApiModelProperty(value = "部门名称")
    @NotBlank(message = "不能为空")
    private String deptName;

    /**
     * 排序
     */
    @TableField(value = "SORT")
    @ApiModelProperty(value = "排序")
    private Integer sort;

    /**
     * 负责人
     */
    @TableField(value = "LEADER")
    @ApiModelProperty(value = "负责人")
    private Long leader;

    /**
     * 部门名称
     */
    @TableField(value = "MOBILE")
    @ApiModelProperty(value = "联系方式")
    private String mobile;

    /**
     * 邮箱
     */
    @TableField(value = "EMAIL")
    @ApiModelProperty(value = "邮箱")
    private String email;

    /**
     * 状态
     */
    @TableField(value = "STATUS")
    @ApiModelProperty(value = "状态(0无效 1有效)", allowableValues = "1,0")
    private String status;

    /**
     * 创建人
     */
    @TableField(value = "CREATE_BY")
    @ApiModelProperty(value = "创建人", hidden = true)
    private String createBy;

    /**
     * 创建时间
     */
    @TableField(value = "CREATE_TIME")
    @ApiModelProperty(value = "创建时间", hidden = true)
    private Date createTime;

    /**
     * 更新人
     */
    @TableField(value = "UPDATE_BY")
    @ApiModelProperty(value = "更新人", hidden = true)
    private String updateBy;

    /**
     * 更新时间
     */
    @TableField(value = "UPDATE_TIME")
    @ApiModelProperty(value = "更新时间", hidden = true)
    private Date updateTime;

    /**
     * 备注
     */
    @TableField(value = "REMARK")
    @ApiModelProperty(value = "备注")
    private String remark;

    /**
     * 地址
     */
    @TableField(value = "ADDRESS")
    @ApiModelProperty(value = "地址", hidden = true)
    private String address;

    /**
     * 负责人
     */
    @TableField(exist = false)
    @ApiModelProperty(value = "负责人", hidden = true)
    private String leaderName;
}